{extend name="layouts/app"/}
{block name="main"}
<div class="layui-card">
    <div class="layui-card-header">添加管理员</div>
    <div class="layui-card-body">
        <form class="layui-form" method="post" action="{:url('save')}">
            <div class="layui-form-item">
                <label class="layui-form-label">登录名</label>
                <div class="layui-input-inline">
                    <input onfocus="this.type='text'" name="username" lay-verify="required" autocomplete="off" placeholder="登录名" class="layui-input" >
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">真实姓名</label>
                <div class="layui-input-inline">
                    <input onfocus="this.type='text'" name="nickname" autocomplete="off" placeholder="真实姓名" class="layui-input">
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">密码</label>
                <div class="layui-input-inline">
                    <input onfocus="this.type='password'" name="password" lay-verify="required" autocomplete="off" placeholder="密码" class="layui-input">
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">确认密码</label>
                <div class="layui-input-inline">
                    <input onfocus="this.type='password'" name="password_confirm" lay-verify="required" autocomplete="off" placeholder="确认密码" class="layui-input">
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">状态</label>
                <div class="layui-input-block">
                    <input type="radio" name="status" value="1" title="正常" checked >
                    <input type="radio" name="status" value="0" title="禁用" >
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">角色</label>
                <div class="layui-input-block">
                    {volist name="$authGroups" id="authGroups"}
                        <input type="checkbox" name="role[]" value="{$authGroups->id}" title="{$authGroups->title}">
                    {/volist}
                </div>
            </div>
            <div class="layui-form-item">
                <div class="layui-input-block">
                    <button class="layui-btn" lay-submit lay-filter="formSubmit">立即提交</button>
                    <button class="layui-btn layui-btn-normal" type="button" onclick="javascript:history.back(-1);">返回</button>
                </div>
            </div>
        </form>
    </div>
</div>
{/block}